package com.lg.erp.service.impl.chenximou;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lg.erp.entity.chenximou.Order;
import com.lg.erp.entity.chenximou.OrderStatus;
import com.lg.erp.mapper.chenximou.OrderStatusMapper;
import com.lg.erp.service.chenximou.IOrderStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderStatusServiceImpl  extends ServiceImpl<OrderStatusMapper, OrderStatus> implements IOrderStatusService {
    @Autowired
    private OrderStatusMapper orderStatusMapper;
    
    @Override
    public List<OrderStatus> getAllOrderStatus() {
        return orderStatusMapper.getAllOrderStatus();
    }

    @Override
    public List<OrderStatus> getOrderStatusById(Order order) {
        String[] split =order.getOrderStatus().split(",");
        String num1=split[0];
        String num2=split[1];
        return orderStatusMapper.getOrderStatusById(num1,num2);
    }
}
